package cn.kai.ums.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName ums_classrome
 */
@TableName(value ="ums_classrome")
@Data
public class UmsClassrome implements Serializable {
    /**
     * 教室自增id
     */
    @TableId(type = IdType.AUTO)
    private Integer classromeId;

    /**
     * 所在教学楼编号（2为数字）
     */
    private String classromeBuildingNo;

    /**
     * 教室名称
     */
    private String classromeName;

    /**
     * 座位数
     */
    private Integer classromeNum;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UmsClassrome other = (UmsClassrome) that;
        return (this.getClassromeId() == null ? other.getClassromeId() == null : this.getClassromeId().equals(other.getClassromeId()))
            && (this.getClassromeBuildingNo() == null ? other.getClassromeBuildingNo() == null : this.getClassromeBuildingNo().equals(other.getClassromeBuildingNo()))
            && (this.getClassromeName() == null ? other.getClassromeName() == null : this.getClassromeName().equals(other.getClassromeName()))
            && (this.getClassromeNum() == null ? other.getClassromeNum() == null : this.getClassromeNum().equals(other.getClassromeNum()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getClassromeId() == null) ? 0 : getClassromeId().hashCode());
        result = prime * result + ((getClassromeBuildingNo() == null) ? 0 : getClassromeBuildingNo().hashCode());
        result = prime * result + ((getClassromeName() == null) ? 0 : getClassromeName().hashCode());
        result = prime * result + ((getClassromeNum() == null) ? 0 : getClassromeNum().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", classromeId=").append(classromeId);
        sb.append(", classromeBuildingNo=").append(classromeBuildingNo);
        sb.append(", classromeName=").append(classromeName);
        sb.append(", classromeNum=").append(classromeNum);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}